﻿namespace DevFramework.Entities.ComplexType
{
    //[Validator(typeof(ShippingDetailValidator))]
    public class ShippingDetail
    {
        //[Required]
        public string Name { get; set; }

        //[Required]
        //[MaxLength(50)]
        //[MinLength(10)]
        public string Address1 { get; set; }

        //[MaxLength(50)]
        public string Address2 { get; set; }

        //[MaxLength(50)]
        public string Address3 { get; set; }

        public string City { get; set; }

        public string Country { get; set; }

        //[OnlyOddNumber(ErrorMessage = "Sadece tek sayı girebilirsiniz")]
        //public int Sayi { get; set; }

        public bool IsGift { get; set; }
    }

    //public class OnlyOddNumberAttribute : ValidationAttribute
    //{
    //    public override bool IsValid(object value)
    //    {
    //        if ((int)value % 2 == 1)
    //        {
    //            return true;
    //        }
    //        return false;
    //    }
    //}
}
